<template lang="pug">
  d2-container(:filename="filename")
    div
        el-button(type="danger" @click="clean_cache") 清除全部缓存
</template>
<script>
import axios from "@/plugin/axios";
export default {
  name: "system-cache",
  data() {
    return {
      filename: __filename
    };
  },
  methods: {
    clean_cache() {
      const options = { url: "admin/cache/clean", method: "post" };
      axios(options).then(() => {
        this.$message({ type: "success", message: "操作成功" });
      });
    }
  }
};
</script>
